package controllers;

import play.*;
import play.mvc.*;

import java.util.*;

import models.*;

public class Application extends Controller {

    public static void index() {
    	long loveDays = getLoveDays();
        render(loveDays);
    }
    
	private static long getLoveDays() {
		long days = 0;

		Calendar loveBeginCalendar = Calendar.getInstance(
				TimeZone.getTimeZone("GMT+8"), Locale.CHINA);
		loveBeginCalendar.set(2010, 9, 4, 22, 01, 56);
		Date beginDate = loveBeginCalendar.getTime();

		Date nowDate = new Date();
		days = (nowDate.getTime() - beginDate.getTime())
				/ (24 * 60 * 60 * 1000);

		return days;
	}

}